﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace odinshrine
{
    class Sprite
    {
        public Vector2 Position = new Vector2(0, 0);
        public float Scale = 1.0f;
        public Rectangle Size;
        public Texture2D Texture;

        //Load les sprites
        public void Load(ContentManager content, string name)
        {
            Texture = content.Load<Texture2D>(name);
            Size = new Rectangle(0, 0, (int)(Scale * Texture.Width), (int)(Scale * Texture.Height));
        }

        //Dessine les sprites
        public void Draw(SpriteBatch spritebatch)
        {
            spritebatch.Draw(Texture, Position, new Rectangle(0, 0, Texture.Width, Texture.Height), Color.White, 0, Vector2.Zero, Scale, SpriteEffects.None, 0);
        }

        //?
        internal void Load(ContentManager content, Sprite caisse)
        {
            throw new NotImplementedException();
        }
    }
}
